package com.ruoyi.hqfinance.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.hqfinance.domain.HqOperateHandlingDetail;
import com.ruoyi.hqfinance.domain.HqOperateHandlingSheetByDay;
import com.ruoyi.hqfinance.domain.vo.HqOperateHandlingDetailVo;
import com.ruoyi.hqfinance.domain.vo.HqOperateHandlingSheetByDayVo;
import com.ruoyi.hqfinance.mapper.HqOperateHandlingDetailMapper;
import com.ruoyi.hqfinance.mapper.HqOperateHandlingSheetByDayMapper;
import com.ruoyi.hqfinance.service.HqOperateHandlingDetailService;
import com.ruoyi.logistic.domain.PageDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HqOperateHandlingDetailServiceImpl implements HqOperateHandlingDetailService {
    @Autowired
    private HqOperateHandlingDetailMapper hqOperateHandlingDetailMapper;
    @Autowired
    private HqOperateHandlingSheetByDayMapper hqOperateHandlingSheetByDayMapper;
    @Override
    public List<HqOperateHandlingDetail> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return hqOperateHandlingDetailMapper.selectAll();
    }

    @Override
    public Boolean insert(HqOperateHandlingDetail hqOperateHandlingDetail) {
        return hqOperateHandlingDetailMapper.insert(hqOperateHandlingDetail);
    }

    @Override
    public Boolean update(HqOperateHandlingDetail hqOperateHandlingDetail) {
        return hqOperateHandlingDetailMapper.update(hqOperateHandlingDetail);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return hqOperateHandlingDetailMapper.deleteById(id);
    }

    @Override
    public List<HqOperateHandlingDetail> search(HqOperateHandlingDetailVo vo) {
        PageHelper.startPage(vo.getPageDate());
        return hqOperateHandlingDetailMapper.search(vo);
    }

    @Override
    public List<HqOperateHandlingSheetByDay> collectByDay(HqOperateHandlingSheetByDayVo vo) {
        PageHelper.startPage(vo.getPageDate());
        return hqOperateHandlingSheetByDayMapper.collectByDay(vo);
    }
}
